package net.huashitong.service.money;

import net.huashitong.mapper.money.SsMoneyOrderMapper;
import net.huashitong.ssydt.money.entity.SsMoneyOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author huiyang.yu
 */
@Service
@Transactional
public class SsMoneyOrderServiceImpl implements SsMoneyOrderService {
    @Autowired
    private SsMoneyOrderMapper mapper;

    @Autowired
    public SsMoneyOrderServiceImpl(SsMoneyOrderMapper mapper) {
        this.mapper = mapper;
    }

    @Override
    public void save(SsMoneyOrder ssMoneyOrder) {
        mapper.save(ssMoneyOrder);
    }

    @Override
    public SsMoneyOrder getByOrderId(String orderId) {
        return mapper.getByOrderId(orderId);
    }

    @Override
    public void update(SsMoneyOrder ssMoneyOrder) {
        mapper.updateByPrimaryKeySelective(ssMoneyOrder);
    }

}
